 function queryParamsCreate (formData,flag)
{
    const key = Object.keys(formData)
    if (!!key){
        let query = '';
        key.forEach(a=>{
            let value=formData[`${a}`]
            if (flag)
            {
                query+= `and ${a} = "${value}*" `
            }else
            {
                query+= `and ${a} = "${value}" `
            }

        })
        return query
    }
    return null
}
 function queryParamsCreate2 (formData)
 {
     const key = Object.keys(formData)

     if (!!key){
         let query = '';
         key.forEach(a=>{
             let value=formData[`${a}`]

             if (!Number(value))
             {
                 query+= `and ${a} = "${value}*" `
             }else
             {
                 query+= `and ${a} = "${value}" `
             }
        })
         return query
     }
     return null
 }
 function fuzzyQueryCreate(formData)
 {
    return  queryParamsCreate (formData,true)
 }
function notFuzzyQueryCreate(formData) {
    return  queryParamsCreate (formData,false)
}
 function paramReplace(source,target) {
    if (!!source && !!target)
    {
        return source.replace(/%{([\s\S]+?)}/g ,target)
    }
    return null
}
export {
    queryParamsCreate2,
    fuzzyQueryCreate,
    notFuzzyQueryCreate,
    queryParamsCreate,
    paramReplace
}